package cn.edu.lingnan.tools;

import lombok.Data;

/**
 * 封装结果集
 */


@Data
public class ResultVo<T> {

    public static final Integer SUCCESSCODE = 0;
    public static final Integer ERRORCODE = 1;
    private Integer code;
    private String message;
    private T Data;
    private String status;
    private Long count;

    public ResultVo(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResultVo(Integer code, String message, String status) {
        this.code = code;
        this.message = message;
        this.status = status;
    }

    public ResultVo(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        Data = data;
    }

    public ResultVo(Integer code, String message, T data, String status) {
        this.code = code;
        this.message = message;
        Data = data;
        this.status = status;
    }

    public ResultVo(Integer code, String message, T data, String status, Long count) {
        this.code = code;
        this.message = message;
        Data = data;
        this.status = status;
        this.count = count;
    }
}

